package com.sj.play.controller;

import com.sj.app.entity.App;
import com.sj.app.service.IAppService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author swallow
 * Created by swallow on 2019/2/7.<br>
 */
@RestController
@RequestMapping(value = "/test")
public class TestController {

    @Autowired
    private IAppService appService;

    @GetMapping
    public String testGetMethod(String testText){
        return testText;
    }

    @GetMapping(value = "/applist")
    public List<App> getAppList(){
        return appService.list(null);
    }
}
